<script>
	function foo() {}
</script>

{#each things as thing}
	<div animate:foo></div>
	<div animate:foo></div>
{/each}